﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Workflow2211A.Domain.Entities
{
    /// <summary>
    /// 审计字段基类
    /// </summary>
    public abstract class BaseEntity
    {
        //在ef中，约定一个实体类中如果属性名是"Id"或者是表名+“Id”,比如表名User，属性名是UserId,
        //则“Id”或者“UserId”则会约定为主键，而不需要加[Key]
        public long Id { get; set; }

        public long CreateUserId { get; set; }
        public long UpdateUserId { get; set; }

        public DateTime? CreateTime { get; set; } = DateTime.Now;
        public DateTime? UpdateTime { get; set; } = DateTime.Now;
        public bool IsDeleted { get; set; }
    }
}
